// 路径配置
require.config({
	paths : {
		//外部
		echarts : 'map/js/echarts-2.2.7/build/dist'
		//内部
		//echarts : 'build/dist'
	}
});

// 使用
require([ 'echarts', 'echarts/chart/map' ], function(ec) {
	var ecConfig = require('echarts/config');
	var zrEvent = require('zrender/tool/event');
	var curIndx = 0;
	
	// var xxxxgeo = null;
	// $.getJSON("js/333.json", function(data){ 
	// alert("111223");
	// xxxxgeo = data.allCity
	// }); 
	
	var xxxxgeo = {
                        '上海': [121.4648,31.2891],
                        '东莞': [113.8953,22.901],
                        '东营': [118.7073,37.5513],
                        '中山': [113.4229,22.478],
                        '临汾': [111.4783,36.1615],
                        '临沂': [118.3118,35.2936],
                        '丹东': [124.541,40.4242],
                        '丽水': [119.5642,28.1854],
                        '乌鲁木齐': [87.9236,43.5883],
                        '佛山': [112.8955,23.1097],
                        '保定': [115.0488,39.0948],
                        '兰州': [103.5901,36.3043],
                        '包头': [110.3467,41.4899],
                        '北京': [116.4551,40.2539],
                        '北海': [109.314,21.6211],
                        '南京': [118.8062,31.9208],
                        '南宁': [108.479,23.1152],
                        '南昌': [116.0046,28.6633],
                        '南通': [121.1023,32.1625],
                        '厦门': [118.1689,24.6478],
                        '台州': [121.1353,28.6688],
                        '合肥': [117.29,32.0581],
                        '呼和浩特': [111.4124,40.4901],
                        '咸阳': [108.4131,34.8706],
                        '哈尔滨': [127.9688,45.368],
                        '唐山': [118.4766,39.6826],
                        '嘉兴': [120.9155,30.6354],
                        '大同': [113.7854,39.8035],
                        '大连': [122.2229,39.4409],
                        '天津': [117.4219,39.4189],
                        '太原': [112.3352,37.9413],
                        '威海': [121.9482,37.1393],
                        '宁波': [121.5967,29.6466],
                        '宝鸡': [107.1826,34.3433],
                        '宿迁': [118.5535,33.7775],
                        '常州': [119.4543,31.5582],
                        '广州': [113.5107,23.2196],
                        '廊坊': [116.521,39.0509],
                        '延安': [109.1052,36.4252],
                        '张家口': [115.1477,40.8527],
                        '徐州': [117.5208,34.3268],
                        '德州': [116.6858,37.2107],
                        '惠州': [114.6204,23.1647],
                        '成都': [103.9526,30.7617],
                        '扬州': [119.4653,32.8162],
                        '承德': [117.5757,41.4075],
                        '拉萨': [91.1865,30.1465],
                        '无锡': [120.3442,31.5527],
                        '日照': [119.2786,35.5023],
                        '昆明': [102.9199,25.4663],
                        '杭州': [119.5313,29.8773],
                        '枣庄': [117.323,34.8926],
                        '柳州': [109.3799,24.9774],
                        '株洲': [113.5327,27.0319],
                        '武汉': [114.3896,30.6628],
                        '汕头': [117.1692,23.3405],
                        '江门': [112.6318,22.1484],
                        '沈阳': [123.1238,42.1216],
                        '沧州': [116.8286,38.2104],
                        '河源': [114.917,23.9722],
                        '泉州': [118.3228,25.1147],
                        '泰安': [117.0264,36.0516],
                        '泰州': [120.0586,32.5525],
                        '济南': [117.1582,36.8701],
                        '济宁': [116.8286,35.3375],
                        '海口': [110.3893,19.8516],
                        '淄博': [118.0371,36.6064],
                        '淮安': [118.927,33.4039],
                        '深圳': [114.5435,22.5439],
                        '清远': [112.9175,24.3292],
                        '温州': [120.498,27.8119],
                        '渭南': [109.7864,35.0299],
                        '湖州': [119.8608,30.7782],
                        '湘潭': [112.5439,27.7075],
                        '滨州': [117.8174,37.4963],
                        '潍坊': [119.0918,36.524],
                        '烟台': [120.7397,37.5128],
                        '玉溪': [101.9312,23.8898],
                        '珠海': [113.7305,22.1155],
                        '盐城': [120.2234,33.5577],
                        '盘锦': [121.9482,41.0449],
                        '石家庄': [114.4995,38.1006],
                        '福州': [119.4543,25.9222],
                        '秦皇岛': [119.2126,40.0232],
                        '绍兴': [120.564,29.7565],
                        '聊城': [115.9167,36.4032],
                        '肇庆': [112.1265,23.5822],
                        '舟山': [122.2559,30.2234],
                        '苏州': [120.6519,31.3989],
                        '莱芜': [117.6526,36.2714],
                        '菏泽': [115.6201,35.2057],
                        '营口': [122.4316,40.4297],
                        '葫芦岛': [120.1575,40.578],
                        '衡水': [115.8838,37.7161],
                        '衢州': [118.6853,28.8666],
                        '西宁': [101.4038,36.8207],
                        '西安': [109.1162,34.2004],
                        '贵阳': [106.6992,26.7682],
                        '连云港': [119.1248,34.552],
                        '邢台': [114.8071,37.2821],
                        '邯郸': [114.4775,36.535],
                        '郑州': [113.4668,34.6234],
                        '鄂尔多斯': [108.9734,39.2487],
                        '重庆': [107.7539,30.1904],
                        '金华': [120.0037,29.1028],
                        '铜川': [109.0393,35.1947],
                        '银川': [106.3586,38.1775],
                        '镇江': [119.4763,31.9702],
                        '长春': [125.8154,44.2584],
                        '长沙': [113.0823,28.2568],
                        '长治': [112.8625,36.4746],
                        '阳泉': [113.4778,38.0951],
                        '青岛': [120.4651,36.3373],
                        '韶关': [113.7964,24.7028]
                    };
	
	
	var xxxx = [
						{name: '重庆市',value: Math.round(Math.random()*1000)},
						{name: '北京市',value: Math.round(Math.random()*1000)},
						{name: '天津市',value: Math.round(Math.random()*1000)},
						{name: '上海市',value: Math.round(Math.random()*1000)},
						{name: '香港',value: Math.round(Math.random()*1000)},
						{name: '澳门',value: Math.round(Math.random()*1000)},
						{name: '巴音郭楞蒙古自治州',value: Math.round(Math.random()*1000)},
						{name: '和田地区',value: Math.round(Math.random()*1000)},
						{name: '哈密地区',value: Math.round(Math.random()*1000)},
						{name: '阿克苏地区',value: Math.round(Math.random()*1000)},
						{name: '阿勒泰地区',value: Math.round(Math.random()*1000)},
						{name: '喀什地区',value: Math.round(Math.random()*1000)},
						{name: '塔城地区',value: Math.round(Math.random()*1000)},
						{name: '昌吉回族自治州',value: Math.round(Math.random()*1000)},
						{name: '克孜勒苏柯尔克孜自治州',value: Math.round(Math.random()*1000)},
						{name: '吐鲁番地区',value: Math.round(Math.random()*1000)},
						{name: '伊犁哈萨克自治州',value: Math.round(Math.random()*1000)},
						{name: '博尔塔拉蒙古自治州',value: Math.round(Math.random()*1000)},
						{name: '乌鲁木齐市',value: Math.round(Math.random()*1000)},
						{name: '克拉玛依市',value: Math.round(Math.random()*1000)},
						{name: '阿拉尔市',value: Math.round(Math.random()*1000)},
						{name: '图木舒克市',value: Math.round(Math.random()*1000)},
						{name: '五家渠市',value: Math.round(Math.random()*1000)},
						{name: '石河子市',value: Math.round(Math.random()*1000)},
						{name: '那曲地区',value: Math.round(Math.random()*1000)},
						{name: '阿里地区',value: Math.round(Math.random()*1000)},
						{name: '日喀则地区',value: Math.round(Math.random()*1000)},
						{name: '林芝地区',value: Math.round(Math.random()*1000)},
						{name: '昌都地区',value: Math.round(Math.random()*1000)},
						{name: '山南地区',value: Math.round(Math.random()*1000)},
						{name: '拉萨市',value: Math.round(Math.random()*1000)},
						{name: '呼伦贝尔市',value: Math.round(Math.random()*1000)},
						{name: '阿拉善盟',value: Math.round(Math.random()*1000)},
						{name: '锡林郭勒盟',value: Math.round(Math.random()*1000)},
						{name: '鄂尔多斯市',value: Math.round(Math.random()*1000)},
						{name: '赤峰市',value: Math.round(Math.random()*1000)},
						{name: '巴彦淖尔市',value: Math.round(Math.random()*1000)},
						{name: '通辽市',value: Math.round(Math.random()*1000)},
						{name: '乌兰察布市',value: Math.round(Math.random()*1000)},
						{name: '兴安盟',value: Math.round(Math.random()*1000)},
						{name: '包头市',value: Math.round(Math.random()*1000)},
						{name: '呼和浩特市',value: Math.round(Math.random()*1000)},
						{name: '乌海市',value: Math.round(Math.random()*1000)},
						{name: '海西蒙古族藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '玉树藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '果洛藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '海南藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '海北藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '黄南藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '海东地区',value: Math.round(Math.random()*1000)},
						{name: '西宁市',value: Math.round(Math.random()*1000)},
						{name: '甘孜藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '阿坝藏族羌族自治州',value: Math.round(Math.random()*1000)},
						{name: '凉山彝族自治州',value: Math.round(Math.random()*1000)},
						{name: '绵阳市',value: Math.round(Math.random()*1000)},
						{name: '达州市',value: Math.round(Math.random()*1000)},
						{name: '广元市',value: Math.round(Math.random()*1000)},
						{name: '雅安市',value: Math.round(Math.random()*1000)},
						{name: '宜宾市',value: Math.round(Math.random()*1000)},
						{name: '乐山市',value: Math.round(Math.random()*1000)},
						{name: '南充市',value: Math.round(Math.random()*1000)},
						{name: '巴中市',value: Math.round(Math.random()*1000)},
						{name: '泸州市',value: Math.round(Math.random()*1000)},
						{name: '成都市',value: Math.round(Math.random()*1000)},
						{name: '资阳市',value: Math.round(Math.random()*1000)},
						{name: '攀枝花市',value: Math.round(Math.random()*1000)},
						{name: '眉山市',value: Math.round(Math.random()*1000)},
						{name: '广安市',value: Math.round(Math.random()*1000)},
						{name: '德阳市',value: Math.round(Math.random()*1000)},
						{name: '内江市',value: Math.round(Math.random()*1000)},
						{name: '遂宁市',value: Math.round(Math.random()*1000)},
						{name: '自贡市',value: Math.round(Math.random()*1000)},
						{name: '黑河市',value: Math.round(Math.random()*1000)},
						{name: '大兴安岭地区',value: Math.round(Math.random()*1000)},
						{name: '哈尔滨市',value: Math.round(Math.random()*1000)},
						{name: '齐齐哈尔市',value: Math.round(Math.random()*1000)},
						{name: '牡丹江市',value: Math.round(Math.random()*1000)},
						{name: '绥化市',value: Math.round(Math.random()*1000)},
						{name: '伊春市',value: Math.round(Math.random()*1000)},
						{name: '佳木斯市',value: Math.round(Math.random()*1000)},
						{name: '鸡西市',value: Math.round(Math.random()*1000)},
						{name: '双鸭山市',value: Math.round(Math.random()*1000)},
						{name: '大庆市',value: Math.round(Math.random()*1000)},
						{name: '鹤岗市',value: Math.round(Math.random()*1000)},
						{name: '七台河市',value: Math.round(Math.random()*1000)},
						{name: '酒泉市',value: Math.round(Math.random()*1000)},
						{name: '张掖市',value: Math.round(Math.random()*1000)},
						{name: '甘南藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '武威市',value: Math.round(Math.random()*1000)},
						{name: '陇南市',value: Math.round(Math.random()*1000)},
						{name: '庆阳市',value: Math.round(Math.random()*1000)},
						{name: '白银市',value: Math.round(Math.random()*1000)},
						{name: '定西市',value: Math.round(Math.random()*1000)},
						{name: '天水市',value: Math.round(Math.random()*1000)},
						{name: '兰州市',value: Math.round(Math.random()*1000)},
						{name: '平凉市',value: Math.round(Math.random()*1000)},
						{name: '临夏回族自治州',value: Math.round(Math.random()*1000)},
						{name: '金昌市',value: Math.round(Math.random()*1000)},
						{name: '嘉峪关市',value: Math.round(Math.random()*1000)},
						{name: '普洱市',value: Math.round(Math.random()*1000)},
						{name: '红河哈尼族彝族自治州',value: Math.round(Math.random()*1000)},
						{name: '文山壮族苗族自治州',value: Math.round(Math.random()*1000)},
						{name: '曲靖市',value: Math.round(Math.random()*1000)},
						{name: '楚雄彝族自治州',value: Math.round(Math.random()*1000)},
						{name: '大理白族自治州',value: Math.round(Math.random()*1000)},
						{name: '临沧市',value: Math.round(Math.random()*1000)},
						{name: '迪庆藏族自治州',value: Math.round(Math.random()*1000)},
						{name: '昭通市',value: Math.round(Math.random()*1000)},
						{name: '昆明市',value: Math.round(Math.random()*1000)},
						{name: '丽江市',value: Math.round(Math.random()*1000)},
						{name: '西双版纳傣族自治州',value: Math.round(Math.random()*1000)},
						{name: '保山市',value: Math.round(Math.random()*1000)},
						{name: '玉溪市',value: Math.round(Math.random()*1000)},
						{name: '怒江傈僳族自治州',value: Math.round(Math.random()*1000)},
						{name: '德宏傣族景颇族自治州',value: Math.round(Math.random()*1000)},
						{name: '百色市',value: Math.round(Math.random()*1000)},
						{name: '河池市',value: Math.round(Math.random()*1000)},
						{name: '桂林市',value: Math.round(Math.random()*1000)},
						{name: '南宁市',value: Math.round(Math.random()*1000)},
						{name: '柳州市',value: Math.round(Math.random()*1000)},
						{name: '崇左市',value: Math.round(Math.random()*1000)},
						{name: '来宾市',value: Math.round(Math.random()*1000)},
						{name: '玉林市',value: Math.round(Math.random()*1000)},
						{name: '梧州市',value: Math.round(Math.random()*1000)},
						{name: '贺州市',value: Math.round(Math.random()*1000)},
						{name: '钦州市',value: Math.round(Math.random()*1000)},
						{name: '贵港市',value: Math.round(Math.random()*1000)},
						{name: '防城港市',value: Math.round(Math.random()*1000)},
						{name: '北海市',value: Math.round(Math.random()*1000)},
						{name: '怀化市',value: Math.round(Math.random()*1000)},
						{name: '永州市',value: Math.round(Math.random()*1000)},
						{name: '邵阳市',value: Math.round(Math.random()*1000)},
						{name: '郴州市',value: Math.round(Math.random()*1000)},
						{name: '常德市',value: Math.round(Math.random()*1000)},
						{name: '湘西土家族苗族自治州',value: Math.round(Math.random()*1000)},
						{name: '衡阳市',value: Math.round(Math.random()*1000)},
						{name: '岳阳市',value: Math.round(Math.random()*1000)},
						{name: '益阳市',value: Math.round(Math.random()*1000)},
						{name: '长沙市',value: Math.round(Math.random()*1000)},
						{name: '株洲市',value: Math.round(Math.random()*1000)},
						{name: '张家界市',value: Math.round(Math.random()*1000)},
						{name: '娄底市',value: Math.round(Math.random()*1000)},
						{name: '湘潭市',value: Math.round(Math.random()*1000)},
						{name: '榆林市',value: Math.round(Math.random()*1000)},
						{name: '延安市',value: Math.round(Math.random()*1000)},
						{name: '汉中市',value: Math.round(Math.random()*1000)},
						{name: '安康市',value: Math.round(Math.random()*1000)},
						{name: '商洛市',value: Math.round(Math.random()*1000)},
						{name: '宝鸡市',value: Math.round(Math.random()*1000)},
						{name: '渭南市',value: Math.round(Math.random()*1000)},
						{name: '咸阳市',value: Math.round(Math.random()*1000)},
						{name: '西安市',value: Math.round(Math.random()*1000)},
						{name: '铜川市',value: Math.round(Math.random()*1000)},
						{name: '清远市',value: Math.round(Math.random()*1000)},
						{name: '韶关市',value: Math.round(Math.random()*1000)},
						{name: '湛江市',value: Math.round(Math.random()*1000)},
						{name: '梅州市',value: Math.round(Math.random()*1000)},
						{name: '河源市',value: Math.round(Math.random()*1000)},
						{name: '肇庆市',value: Math.round(Math.random()*1000)},
						{name: '惠州市',value: Math.round(Math.random()*1000)},
						{name: '茂名市',value: Math.round(Math.random()*1000)},
						{name: '江门市',value: Math.round(Math.random()*1000)},
						{name: '阳江市',value: Math.round(Math.random()*1000)},
						{name: '云浮市',value: Math.round(Math.random()*1000)},
						{name: '广州市',value: Math.round(Math.random()*1000)},
						{name: '汕尾市',value: Math.round(Math.random()*1000)},
						{name: '揭阳市',value: Math.round(Math.random()*1000)},
						{name: '珠海市',value: Math.round(Math.random()*1000)},
						{name: '佛山市',value: Math.round(Math.random()*1000)},
						{name: '潮州市',value: Math.round(Math.random()*1000)},
						{name: '汕头市',value: Math.round(Math.random()*1000)},
						{name: '深圳市',value: Math.round(Math.random()*1000)},
						{name: '东莞市',value: Math.round(Math.random()*1000)},
						{name: '中山市',value: Math.round(Math.random()*1000)},
						{name: '延边朝鲜族自治州',value: Math.round(Math.random()*1000)},
						{name: '吉林市',value: Math.round(Math.random()*1000)},
						{name: '白城市',value: Math.round(Math.random()*1000)},
						{name: '松原市',value: Math.round(Math.random()*1000)},
						{name: '长春市',value: Math.round(Math.random()*1000)},
						{name: '白山市',value: Math.round(Math.random()*1000)},
						{name: '通化市',value: Math.round(Math.random()*1000)},
						{name: '四平市',value: Math.round(Math.random()*1000)},
						{name: '辽源市',value: Math.round(Math.random()*1000)},
						{name: '承德市',value: Math.round(Math.random()*1000)},
						{name: '张家口市',value: Math.round(Math.random()*1000)},
						{name: '保定市',value: Math.round(Math.random()*1000)},
						{name: '唐山市',value: Math.round(Math.random()*1000)},
						{name: '沧州市',value: Math.round(Math.random()*1000)},
						{name: '石家庄市',value: Math.round(Math.random()*1000)},
						{name: '邢台市',value: Math.round(Math.random()*1000)},
						{name: '邯郸市',value: Math.round(Math.random()*1000)},
						{name: '秦皇岛市',value: Math.round(Math.random()*1000)},
						{name: '衡水市',value: Math.round(Math.random()*1000)},
						{name: '廊坊市',value: Math.round(Math.random()*1000)},
						{name: '恩施土家族苗族自治州',value: Math.round(Math.random()*1000)},
						{name: '十堰市',value: Math.round(Math.random()*1000)},
						{name: '宜昌市',value: Math.round(Math.random()*1000)},
						{name: '襄樊市',value: Math.round(Math.random()*1000)},
						{name: '黄冈市',value: Math.round(Math.random()*1000)},
						{name: '荆州市',value: Math.round(Math.random()*1000)},
						{name: '荆门市',value: Math.round(Math.random()*1000)},
						{name: '咸宁市',value: Math.round(Math.random()*1000)},
						{name: '随州市',value: Math.round(Math.random()*1000)},
						{name: '孝感市',value: Math.round(Math.random()*1000)},
						{name: '武汉市',value: Math.round(Math.random()*1000)},
						{name: '黄石市',value: Math.round(Math.random()*1000)},
						{name: '神农架林区',value: Math.round(Math.random()*1000)},
						{name: '天门市',value: Math.round(Math.random()*1000)},
						{name: '仙桃市',value: Math.round(Math.random()*1000)},
						{name: '潜江市',value: Math.round(Math.random()*1000)},
						{name: '鄂州市',value: Math.round(Math.random()*1000)},
						{name: '遵义市',value: Math.round(Math.random()*1000)},
						{name: '黔东南苗族侗族自治州',value: Math.round(Math.random()*1000)},
						{name: '毕节地区',value: Math.round(Math.random()*1000)},
						{name: '黔南布依族苗族自治州',value: Math.round(Math.random()*1000)},
						{name: '铜仁地区',value: Math.round(Math.random()*1000)},
						{name: '黔西南布依族苗族自治州',value: Math.round(Math.random()*1000)},
						{name: '六盘水市',value: Math.round(Math.random()*1000)},
						{name: '安顺市',value: Math.round(Math.random()*1000)},
						{name: '贵阳市',value: Math.round(Math.random()*1000)},
						{name: '烟台市',value: Math.round(Math.random()*1000)},
						{name: '临沂市',value: Math.round(Math.random()*1000)},
						{name: '潍坊市',value: Math.round(Math.random()*1000)},
						{name: '青岛市',value: Math.round(Math.random()*1000)},
						{name: '菏泽市',value: Math.round(Math.random()*1000)},
						{name: '济宁市',value: Math.round(Math.random()*1000)},
						{name: '德州市',value: Math.round(Math.random()*1000)},
						{name: '滨州市',value: Math.round(Math.random()*1000)},
						{name: '聊城市',value: Math.round(Math.random()*1000)},
						{name: '东营市',value: Math.round(Math.random()*1000)},
						{name: '济南市',value: Math.round(Math.random()*1000)},
						{name: '泰安市',value: Math.round(Math.random()*1000)},
						{name: '威海市',value: Math.round(Math.random()*1000)},
						{name: '日照市',value: Math.round(Math.random()*1000)},
						{name: '淄博市',value: Math.round(Math.random()*1000)},
						{name: '枣庄市',value: Math.round(Math.random()*1000)},
						{name: '莱芜市',value: Math.round(Math.random()*1000)},
						{name: '赣州市',value: Math.round(Math.random()*1000)},
						{name: '吉安市',value: Math.round(Math.random()*1000)},
						{name: '上饶市',value: Math.round(Math.random()*1000)},
						{name: '九江市',value: Math.round(Math.random()*1000)},
						{name: '抚州市',value: Math.round(Math.random()*1000)},
						{name: '宜春市',value: Math.round(Math.random()*1000)},
						{name: '南昌市',value: Math.round(Math.random()*1000)},
						{name: '景德镇市',value: Math.round(Math.random()*1000)},
						{name: '萍乡市',value: Math.round(Math.random()*1000)},
						{name: '鹰潭市',value: Math.round(Math.random()*1000)},
						{name: '新余市',value: Math.round(Math.random()*1000)},
						{name: '南阳市',value: Math.round(Math.random()*1000)},
						{name: '信阳市',value: Math.round(Math.random()*1000)},
						{name: '洛阳市',value: Math.round(Math.random()*1000)},
						{name: '驻马店市',value: Math.round(Math.random()*1000)},
						{name: '周口市',value: Math.round(Math.random()*1000)},
						{name: '商丘市',value: Math.round(Math.random()*1000)},
						{name: '三门峡市',value: Math.round(Math.random()*1000)},
						{name: '新乡市',value: Math.round(Math.random()*1000)},
						{name: '平顶山市',value: Math.round(Math.random()*1000)},
						{name: '郑州市',value: Math.round(Math.random()*1000)},
						{name: '安阳市',value: Math.round(Math.random()*1000)},
						{name: '开封市',value: Math.round(Math.random()*1000)},
						{name: '焦作市',value: Math.round(Math.random()*1000)},
						{name: '许昌市',value: Math.round(Math.random()*1000)},
						{name: '濮阳市',value: Math.round(Math.random()*1000)},
						{name: '漯河市',value: Math.round(Math.random()*1000)},
						{name: '鹤壁市',value: Math.round(Math.random()*1000)},
						{name: '大连市',value: Math.round(Math.random()*1000)},
						{name: '朝阳市',value: Math.round(Math.random()*1000)},
						{name: '丹东市',value: Math.round(Math.random()*1000)},
						{name: '铁岭市',value: Math.round(Math.random()*1000)},
						{name: '沈阳市',value: Math.round(Math.random()*1000)},
						{name: '抚顺市',value: Math.round(Math.random()*1000)},
						{name: '葫芦岛市',value: Math.round(Math.random()*1000)},
						{name: '阜新市',value: Math.round(Math.random()*1000)},
						{name: '锦州市',value: Math.round(Math.random()*1000)},
						{name: '鞍山市',value: Math.round(Math.random()*1000)},
						{name: '本溪市',value: Math.round(Math.random()*1000)},
						{name: '营口市',value: Math.round(Math.random()*1000)},
						{name: '辽阳市',value: Math.round(Math.random()*1000)},
						{name: '盘锦市',value: Math.round(Math.random()*1000)},
						{name: '忻州市',value: Math.round(Math.random()*1000)},
						{name: '吕梁市',value: Math.round(Math.random()*1000)},
						{name: '临汾市',value: Math.round(Math.random()*1000)},
						{name: '晋中市',value: Math.round(Math.random()*1000)},
						{name: '运城市',value: Math.round(Math.random()*1000)},
						{name: '大同市',value: Math.round(Math.random()*1000)},
						{name: '长治市',value: Math.round(Math.random()*1000)},
						{name: '朔州市',value: Math.round(Math.random()*1000)},
						{name: '晋城市',value: Math.round(Math.random()*1000)},
						{name: '太原市',value: Math.round(Math.random()*1000)},
						{name: '阳泉市',value: Math.round(Math.random()*1000)},
						{name: '六安市',value: Math.round(Math.random()*1000)},
						{name: '安庆市',value: Math.round(Math.random()*1000)},
						{name: '滁州市',value: Math.round(Math.random()*1000)},
						{name: '宣城市',value: Math.round(Math.random()*1000)},
						{name: '阜阳市',value: Math.round(Math.random()*1000)},
						{name: '宿州市',value: Math.round(Math.random()*1000)},
						{name: '黄山市',value: Math.round(Math.random()*1000)},
						{name: '巢湖市',value: Math.round(Math.random()*1000)},
						{name: '亳州市',value: Math.round(Math.random()*1000)},
						{name: '池州市',value: Math.round(Math.random()*1000)},
						{name: '合肥市',value: Math.round(Math.random()*1000)},
						{name: '蚌埠市',value: Math.round(Math.random()*1000)},
						{name: '芜湖市',value: Math.round(Math.random()*1000)},
						{name: '淮北市',value: Math.round(Math.random()*1000)},
						{name: '淮南市',value: Math.round(Math.random()*1000)},
						{name: '马鞍山市',value: Math.round(Math.random()*1000)},
						{name: '铜陵市',value: Math.round(Math.random()*1000)},
						{name: '南平市',value: Math.round(Math.random()*1000)},
						{name: '三明市',value: Math.round(Math.random()*1000)},
						{name: '龙岩市',value: Math.round(Math.random()*1000)},
						{name: '宁德市',value: Math.round(Math.random()*1000)},
						{name: '福州市',value: Math.round(Math.random()*1000)},
						{name: '漳州市',value: Math.round(Math.random()*1000)},
						{name: '泉州市',value: Math.round(Math.random()*1000)},
						{name: '莆田市',value: Math.round(Math.random()*1000)},
						{name: '厦门市',value: Math.round(Math.random()*1000)},
						{name: '丽水市',value: Math.round(Math.random()*1000)},
						{name: '杭州市',value: Math.round(Math.random()*1000)},
						{name: '温州市',value: Math.round(Math.random()*1000)},
						{name: '宁波市',value: Math.round(Math.random()*1000)},
						{name: '舟山市',value: Math.round(Math.random()*1000)},
						{name: '台州市',value: Math.round(Math.random()*1000)},
						{name: '金华市',value: Math.round(Math.random()*1000)},
						{name: '衢州市',value: Math.round(Math.random()*1000)},
						{name: '绍兴市',value: Math.round(Math.random()*1000)},
						{name: '嘉兴市',value: Math.round(Math.random()*1000)},
						{name: '湖州市',value: Math.round(Math.random()*1000)},
						{name: '盐城市',value: Math.round(Math.random()*1000)},
						{name: '徐州市',value: Math.round(Math.random()*1000)},
						{name: '南通市',value: Math.round(Math.random()*1000)},
						{name: '淮安市',value: Math.round(Math.random()*1000)},
						{name: '苏州市',value: Math.round(Math.random()*1000)},
						{name: '宿迁市',value: Math.round(Math.random()*1000)},
						{name: '连云港市',value: Math.round(Math.random()*1000)},
						{name: '扬州市',value: Math.round(Math.random()*1000)},
						{name: '南京市',value: Math.round(Math.random()*1000)},
						{name: '泰州市',value: Math.round(Math.random()*1000)},
						{name: '无锡市',value: Math.round(Math.random()*1000)},
						{name: '常州市',value: Math.round(Math.random()*1000)},
						{name: '镇江市',value: Math.round(Math.random()*1000)},
						{name: '吴忠市',value: Math.round(Math.random()*1000)},
						{name: '中卫市',value: Math.round(Math.random()*1000)},
						{name: '固原市',value: Math.round(Math.random()*1000)},
						{name: '银川市',value: Math.round(Math.random()*1000)},
						{name: '石嘴山市',value: Math.round(Math.random()*1000)},
						{name: '儋州市',value: Math.round(Math.random()*1000)},
						{name: '文昌市',value: Math.round(Math.random()*1000)},
						{name: '乐东黎族自治县',value: Math.round(Math.random()*1000)},
						{name: '三亚市',value: Math.round(Math.random()*1000)},
						{name: '琼中黎族苗族自治县',value: Math.round(Math.random()*1000)},
						{name: '东方市',value: Math.round(Math.random()*1000)},
						{name: '海口市',value: Math.round(Math.random()*1000)},
						{name: '万宁市',value: Math.round(Math.random()*1000)},
						{name: '澄迈县',value: Math.round(Math.random()*1000)},
						{name: '白沙黎族自治县',value: Math.round(Math.random()*1000)},
						{name: '琼海市',value: Math.round(Math.random()*1000)},
						{name: '昌江黎族自治县',value: Math.round(Math.random()*1000)},
						{name: '临高县',value: Math.round(Math.random()*1000)},
						{name: '陵水黎族自治县',value: Math.round(Math.random()*1000)},
						{name: '屯昌县',value: Math.round(Math.random()*1000)},
						{name: '定安县',value: Math.round(Math.random()*1000)},
						{name: '保亭黎族苗族自治县',value: Math.round(Math.random()*1000)},
						{name: '五指山市',value: Math.round(Math.random()*1000)}
	];
	
	var mapType = [
	    'china',
	    // 23个省
	    '广东', '青海', '四川', '海南', '陕西', 
	    '甘肃', '云南', '湖南', '湖北', '黑龙江',
	    '贵州', '山东', '江西', '河南', '河北',
	    '山西', '安徽', '福建', '浙江', '江苏', 
	    '吉林', '辽宁', '台湾',
	    // 5个自治区
	    '新疆', '广西', '宁夏', '内蒙古', '西藏', 
	    // 4个直辖市
	    '北京', '天津', '上海', '重庆',
	    // 2个特别行政区
	    '香港', '澳门'
	];
	var resultJsonTop10City = null;
	var resultJsonCapitalCity = null;
	var option = null;
	var myChart = ec.init(document.getElementById('mainChina'));
	myChart.showLoading({
		text: '正在努力的读取数据中...',    //loading话术
		});
	//通过Ajax获取数据  
	$.ajax({
		url: '/rest/developer/queryMapData',
		type: 'get',
		dataType:'json',
		contentType:'application/json',
		cache:false,
		data: '{"password":"'+$("#password1").val()+'"}',
		success: function(msg){
			resultJsonTop10City = msg.Top10City;
			resultJsonCapitalCity = msg.CapitalCity;
			myChart.hideLoading();  
			option = {
				backgroundColor: '#1b1b1b',
				title: {
					text : '终端交易全国分布图2',
					subtext : '中国银联 （点击地图切换省市）',
					x:'center',
					textStyle : {
					color: '#fff'
					}
				},
				tooltip : {
					trigger: 'item'
				},
				legend: {
					orient: 'vertical',
					x:'left',
					data:['Top10','交易总金额','成交总量'],
					selectedMode: 'single',
					selected:{
					'交易总金额' : false,
					'成交总量' : false
					},
					textStyle : {
					color: '#fff'
					}
				},
				dataRange: {
					min: 0,
					max: 100,
					color:['orange','yellow'],
					text:['高','低'],           // 文本，默认为数值文本
					calculable : true
				},
				series : [
					{
						name: 'Top10',
						type: 'map',
						mapType: 'china',
						selectedMode : 'single',
						itemStyle:{
							normal:{label:{show:true}},
							emphasis:{label:{show:true}}
						},
						data: xxxx,
						//data: '',
						geoCoord: xxxxgeo,
						markPoint : {
							symbol:'emptyCircle',
							symbolSize : function (v){
								return 10 + v/10
							},
							effect : {
								show: true,
								shadowBlur : 0
							},
							itemStyle:{
								normal:{
									label:{show:true}
								}
							},
							data : resultJsonTop10City
						}
					},
					{
						name: '成交总量',
						type: 'map',
						mapType: 'china',
						selectedMode : 'single',
						roam: false,
						itemStyle:{
							normal:{label:{show:true}},
							emphasis:{label:{show:true}}
						},
						data: resultJsonCapitalCity
					},
					{
						name: '交易总金额',
						type: 'map',
						mapType: 'china',
						selectedMode : 'single',
						roam: false,
						itemStyle:{
							normal:{label:{show:true}},
							emphasis:{label:{show:true}}
						},
						data: resultJsonCapitalCity
					}
				]
			};
			myChart.setOption(option, true);
		},
		error: function(msg){
			alert("不好意思，大爷，图表请求数据失败啦!"); 
			myChart.hideLoading();  
		}
	});
	myChart.onmousewheel = function (e){
	    var event = e || window.event;
	    curIndx += zrEvent.getDelta(event) > 0 ? (-1) : 1;
	    if (curIndx < 0) {
	        curIndx = mapType.length - 1;
	    }
	    var mt = mapType[curIndx % mapType.length];
	    if (mt == 'china') {
	        option.tooltip.formatter = '滚轮切换或点击进入该省<br/>{b}';
	    }
	    else{
			alert("111");
	        option.tooltip.formatter = '滚轮切换省份或点击返回全国<br/>{b}';
	    }
	    option.series[0].mapType = mt;
	    option.title.subtext = mt + ' （点击地图切换省市）';
	    myChart.setOption(option, true);
	    
	    zrEvent.stop(event);
	};
	myChart.on(ecConfig.EVENT.MAP_SELECTED, function (param){

	    var len = mapType.length;
	    var mt = mapType[curIndx % len];
	    if (mt == 'china') {
	        // 全国选择时指定到选中的省份
	        var selected = param.selected;
	        for (var i in selected) {
	            if (selected[i]) {
	                mt = i;
	                while (len--) {
	                    if (mapType[len] == mt) {
	                        curIndx = len;
	                    }
	                }
	                break;
	            }
	        }
	        option.tooltip.formatter = '滚轮切换省份或点击返回全国<br/>{b}';
			backgroundColor: '#1b1b1b',
			option.series[0].mapType = mt;
			option.series[1].mapType = mt;
			option.title.subtext = mt + ' （点击地图切换省市）';
			option.series[0] = {
				name: '终端数量',
				type: 'map',
				mapType: mt,
				itemStyle:{
					normal:{label:{show:true}},
					emphasis:{label:{show:true}}
				},
				mapLocation: {
					x: '35%'
				},
				roam: false,
				data:xxxx
			};
			option.legend = {
				x:'right',
				data:['终端数量']
			};
			option.dataRange = {
				orient: 'horizontal',
				x: 'right',
				min: 0,
				max: 100,
				color:['orange','yellow'],
				text:['高','低'],           // 文本，默认为数值文本
				splitNumber:0
			};
			option.tooltip = {
				trigger: 'item'
			};
			myChart.setOption(option, true);
	    }
	    else {
			//history.go(0);
	        curIndx = 0;
	        mt = 'china';
			option.series[0].mapType = mt;
			option.series[1].mapType = mt;
			//option.series[2].type = 'map';
	        option.tooltip.formatter = '滚轮切换或点击进入该省<br/>{b}';
			option = {
				backgroundColor: '#1b1b1b',
				title: {
					text : '终端交易全国分布图',
					subtext : '中国银联 （点击地图切换省市）',
					x:'center'
				},
				tooltip : {
					trigger: 'item'
				},
				legend: {
					orient: 'vertical',
					x:'left',
					data:['Top10','交易总金额','成交总量'],
					selectedMode: 'single',
					
					textStyle : {
					color: '#fff'
					}
				},
				dataRange: {
					min: 0,
					max: 100,
					color:['orange','yellow'],
					text:['高','低'],           // 文本，默认为数值文本
					calculable : true
				},
				series : [
					{
						name: 'Top10',
						type: 'map',
						mapType: 'china',
						selectedMode : 'single',
						itemStyle:{
							normal:{label:{show:true}},
							emphasis:{label:{show:true}}
						},
						data: xxxx,
						geoCoord: xxxxgeo,
						markPoint : {
							symbol:'emptyCircle',
							symbolSize : function (v){
								return 10 + v/10
							},
							effect : {
								show: true,
								shadowBlur : 0
							},
							itemStyle:{
								normal:{
									label:{show:false}
								}
							},
							data : [
								{name:'上海',value:95},
								{name:'广州',value:90},
								{name:'大连',value:80},
								{name:'南宁',value:70},
								{name:'南昌',value:60},
								{name:'拉萨',value:50},
								{name:'长春',value:40},
								{name:'包头',value:30},
								{name:'重庆',value:20},
								{name:'常州',value:10}
							]
						}
					},
					{
						name: '成交总量',
						type: 'map',
						mapType: 'china',
						selectedMode : 'single',
						roam: false,
						itemStyle:{
							normal:{label:{show:true}},
							emphasis:{label:{show:true}}
						},
						data: resultJsonCapitalCity
					},
					{
						name: '交易总金额',
						type: 'map',
						mapType: 'china',
						selectedMode : 'single',
						roam: false,
						itemStyle:{
							normal:{label:{show:true}},
							emphasis:{label:{show:true}}
						},
						data: resultJsonCapitalCity
					}
				]
			};
			myChart.setOption(option, true);
	    }
	});
	
});